package com.rules.admin.entity;


import com.google.common.collect.ImmutableSet;
import com.rules.admin.domain.IRole;
import com.rules.admin.domain.ITable;
import com.rules.admin.domain.IUser;


import java.io.Serializable;
import java.util.Collection;
import java.util.Set;

public class User implements IUser, Serializable {
   private static final long serialVersionUID = -7216838057325845828L;
   private String id;
   private String username;
   private String password;
   private Set<String> hasPermissionUrlPatterns;

   public Collection<ITable> getPermissionTables() {
      return null;
   }

   public String getId() {
      return this.id;
   }

   public void setId(String id) {
      this.id = id;
   }

   public void setPassword(String password) {
      this.password = password;
   }

   public String getUserId() {
      return null;
   }

   public Collection<IRole> getAuthorities() {
      return null;
   }

   public void setAuthorities(Iterable<? extends IRole> roles) {
   }

   public String getPassword() {
      return this.password;
   }

   public String getUsername() {
      return this.username;
   }

   public void setUsername(String username) {
      this.username = username;
   }

   public boolean isAccountNonExpired() {
      return true;
   }

   public boolean isAccountNonLocked() {
      return true;
   }

   public boolean isCredentialsNonExpired() {
      return true;
   }

   public boolean isEnabled() {
      return true;
   }

   public void setHasPermissionUrlPatterns(Iterable<String> hasPermissionUrlPatterns) {
      this.hasPermissionUrlPatterns = ImmutableSet.copyOf(hasPermissionUrlPatterns);
   }

   public Set<String> getHasPermissionUrlPatterns() {
      return this.hasPermissionUrlPatterns;
   }
}
